package abacab.message;

import abacab.ref.ActorRef;

/**
 * Represents an envelope for a message
 * 
 * @param <M>
 *          the message type
 */
@SuppressWarnings("rawtypes")
public class Envelope<M> {
	/** The sender */
	private final ActorRef	sender;

	/** The message */
	private final M					message;

	/**
	 * Create the envelope
	 * 
	 * @param sender
	 *          the sender
	 * @param message
	 *          the message
	 */
	public Envelope(ActorRef sender, M message) {
		this.sender = sender;
		this.message = message;
	}

	/**
	 * @return the sender
	 */
	public final ActorRef getSender() {
		return this.sender;
	}

	/**
	 * @return the message
	 */
	public final M getMessage() {
		return this.message;
	}

}